package lcweekfight.w_384;

import java.util.*;

public class Code01_100144 {
    public List<Integer> findPeaks(int[] mountain) {
        int[] temp = new int[mountain.length];
        for(int i = 0;i < temp.length - 1;i++){
            temp[i] = mountain[i] - mountain[i + 1];
        }
        for(int i = mountain.length - 1;i > 0;i--){
            mountain[i] = mountain[i] - mountain[i - 1];
        }
        mountain[0] = 0;
        List<Integer> res = new ArrayList<>();
        for(int i = 1;i < mountain.length - 1;i++){
            if(mountain[i] > 0 && temp[i] > 0){
                res.add(i);
            }
        }

        return res;

    }
}
